<template>
  <div>
  <el-menu  :default-active="activeIndex2"
  class="el-menu-demo"
  mode="horizontal"
  @select="handleSelect"
  background-color="#545c64"
  text-color="#fff"
  active-text-color="#ffd04b">
   <el-menu-item index="1"><router-link to="/">主页</router-link></el-menu-item>
  <el-menu-item index="2">新增</el-menu-item>
 
</el-menu>
    <el-input
    placeholder="tenantId"
    suffix-icon="el-icon-date"
    v-model="tenantId"
    type="text">
  </el-input>
  <el-input
    placeholder="userName"
    suffix-icon="el-icon-date"
    v-model="userName"
    type="text">
  </el-input>
  <el-input
    placeholder="userCode"
    suffix-icon="el-icon-date"
    v-model="userCode"
    type="text">
  </el-input>
  <el-input
    placeholder="password"
    suffix-icon="el-icon-date"
    v-model="password"
    type="text">
  </el-input>
  <el-input
    placeholder="orgId"
    suffix-icon="el-icon-date"
    v-model="orgId"
    type="text">
  </el-input>
  <el-input
    placeholder="mobile"
    suffix-icon="el-icon-date"
    v-model="mobile"
    type="text">
  </el-input>
  <el-input
    placeholder="userTypeCode"
    suffix-icon="el-icon-date"
    v-model="userTypeCode"
    type="text">
  </el-input>
  <el-input
    placeholder="userStatusCode"
    suffix-icon="el-icon-date"
    v-model="userStatusCode"
    type="text">
  </el-input>
  <el-input
    placeholder="createdBy"
    suffix-icon="el-icon-date"
    v-model="createdBy"
    type="text">
  </el-input>
  <el-input
    placeholder="createdTime"
    suffix-icon="el-icon-date"
    v-model="createdTime"
    type="date">
  </el-input>
  <el-input
    placeholder="updatedBy"
    suffix-icon="el-icon-date"
    v-model="updatedBy"
    type="text">
  </el-input>
  <el-input
    placeholder="updatedTime"
    suffix-icon="el-icon-date"
    v-model="updatedTime"
    type="date">
  </el-input>
  <el-input
    placeholder="modiNum"
    suffix-icon="el-icon-date"
    v-model="modiNum"
    type="number">
  </el-input>
  <el-input
    placeholder="lockTime"
    suffix-icon="el-icon-date"
    v-model="lockTime"
    type="date">
  </el-input>
  <el-input
    placeholder="passwordRetries"
    suffix-icon="el-icon-date"
    v-model="passwordRetries"
    type="number">
  </el-input>
  <el-input
    placeholder="passwordUpdateTime"
    suffix-icon="el-icon-date"
    v-model="passwordUpdateTime"
    type="date">
  </el-input>
  <el-input
    placeholder="userSkin"
    suffix-icon="el-icon-date"
    v-model="userSkin"
    type="text">
  </el-input>
  <el-button type="primary" icon="el-icon-search" @click="addData">确定</el-button>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      tenantId: "",
      userName: "",
      userCode: "",
      password: "",
      orgId: "",
      mobile: "",
      userTypeCode: "",
      userStatusCode: "",
      createdBy: "",
      createdTime: "",
      updatedBy: "",
      updatedTime: "",
      modiNum: "",
      lockTime: "",
      passwordRetries: "",
      passwordUpdateTime: "",
      userSkin: "",
    };
  },
  methods: {
    addData() {
      axios({
        method: "post",
        url: "http://localhost:10086/sysUser/insert",
        data:
          "&tenantId=" +
          this.tenantId +
          "&userName=" +
          this.userName +
          "&userCode=" +
          this.userCode+
          "&password=" +
          this.password +
          "&orgId=" +
          this.orgId +
          "&mobile=" +
          this.mobile+
          "&userTypeCode=" +
          this.userTypeCode +
          "&userStatusCode=" +
          this.userStatusCode +
          "&createdBy=" +
          this.createdBy+
          "&createdTime=" +
          this.createdTime +
          "&updatedBy=" +
          this.updatedBy +
          "&updatedTime=" +
          this.updatedTime+
          "&modiNum=" +
          this.modiNum +
          "&lockTime=" +
          this.lockTime +
          "&passwordRetries=" +
          this.passwordRetries+
          "&passwordUpdateTime=" +
          this.passwordUpdateTime+
          "&userSkin=" +
          this.userSkin,
      })
        .then((response) => {
          console.log(response);
          this.$router.push({ path: "/" });
        })
        .catch((error) => {
          console.log(error);
        });
    },
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
tr {
  border: 1px solid #000;
}
</style>